// 进行状态管理通过getters建立对于模块中属性的快捷访问
const getters = {
  sidebar: state => state.app.sidebar,
  device: state => state.app.device,
  token: state => state.user.token,
  // 向外暴露用户id
  userId: state => state.user.userInfo.userId,
  // 向外暴露头像
  avatar: state => state.user.userInfo.staffPhoto, // 向外暴露头像
  // 向外暴露用户名
  name: state => state.user.userInfo.username
}

export default getters
